<?php 
	class M_nhanvien extends CI_Model{
		protected $_table = "person";
		function __construct(){
			parent :: __construct();
			$this->load->helper('url');
			$this->load->database();
		}
		public function my_info($number){
			$this->db->where('id',$number);
			return $this->db->get($this->_table)->result_array();
		}		
		
		public function xoa_nhan_vien($number){
			$this->db->where('id',$number);
			return $this->db->delete($this->_table);
		}
		
		public function person_info(){			
			return $this->db->get($this->_table)->result_array();
		}
		public function listall($offset,$start){
			$this->db->limit($offset,$start);
			$this->db->order_by("id","asc");
			return $this->db->get($this->_table)->result_array();
    	}
     	public function count_all(){
        	return $this->db->count_all($this->_table);
    	}	
		
	}
?>